Skip to content

Update kinetis pinctrl script for pin mask #582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EmilioCBen
Copy link
Collaborator

Updated the Pinctrl generation script to use the source xml files into finding the pin_mux mask variable. Changed from hard coding this part of the generated macro to using this new mask variable.

Updated the Pinctrl generation script to use the source
xml files into finding the pin_mux mask variable. Changed
from hard coding this part of the generated macro to
using this new mask variable.
macro_mask = pin_mux_opt[pin_mux_opt_name]._mask
macro_mask_after_bitshift = f"0x{int(macro_mask, 0) >> 8:X}"

mux_macro += "\t(((mux) & " + str(macro_mask_after_bitshift) + ") << 8))\n\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to force to str() here, the f-string above will already do that

Copy link
Contributor

@danieldegrasse danieldegrasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these changes intended to support V14 of the config tools file format? That is what the scripts are documented to support right now: https://github.com/zephyrproject-rtos/hal_nxp/tree/master/mcux/scripts/pinctrl#requirements. If the update is being made because the format has changed, it would be good to update the version of the file format we know the scripts work with (since I'm assuming you just tested them with this PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants